#! /bin/bash

mkdir -p /var/log/mlsql
echo "mlsql-engine start"
nohup sh /opt/mlsql-engine/start-default.sh 2>&1>>/var/log/mlsql/mlsql-engine.log &

sleep 5
echo "mlsql-cluster start"
nohup sh /opt/mlsql-cluster/start-default.sh 2>&1>>/var/log/mlsql/mlsql-console.log &

echo "mlsql-console start"
nohup sh /opt/mlsql-console/start-default.sh 2>&1>>/var/log/mlsql/mlsql-console.log &


echo " ---------------------------------------------------------------------------"
echo "| mlsql-engine 访问 http://IP:9003/#/                                      |"
echo "| mlsql-cluster test http://IP:8081/backend/active                         |"
echo "| 测试：查看http://IP:8081/backend/active是否可以访问，如果成功则会返回{}。|"
echo "| mlsql-console 访问 http://IP:9002/                                       |"
echo "|                                                                          |"
echo "|                                                                          |"
echo "| 注册用户名的格式 xxx@gmail.com                                           |"
echo "| 帮助文档：https://docs.mlsql.tech/zh/grammar/                            |"
echo "| 框架下载地址：http://download.mlsql.tech/1.6.0-SNAPSHOT/                 |"
echo "| 官网地址： http://www.mlsql.tech/                                        |"
echo " ---------------------------------------------------------------------------"
